package com.yywz;

public class Money {
	private static final char[] datas = { '零', '壹', '贰', '叁', '肆', '伍', '陆',
			'柒', '捌', '玖' };
	private static final char[] units = { '元', '拾', '佰', '仟', '万', '拾', '佰',
			'仟', '亿' };

	public static void main(String[] args) {
		System.out.println(convert(3212131));
	}

	public static String convert(int money) {
		StringBuffer sb = new StringBuffer();
		int unit = 0;
		while (money != 0) {
			sb.insert(0, units[unit++]);
			int num = money % 10;
			sb.insert(0, datas[num]);
			money /= 10;
		}
		return sb.toString();
	}
}
